package com.ucode.tool.base;
/**
 * 公共响应返回状态
 * @author liliang
 * @date: 2019年12月6日 上午11:05:25
 */
public enum ResultCodeEnum {

    SUCCESS(0, "操作成功"),
    FAILED(1, "操作失败"),
    UNAUTHORIZED(2,"未授权,无法访问"),
    UNAUTHENTICATED(3,"未登录或token已过期"),	
    VALIDATE_FAILED(4,"参数校验失败"),
    USER_UNREGISTERED(5,"用户未注册"),
    USERNAME_REPEAT(6,"用户名已注册"),
    MOBILE_REPEAT(7,"手机号已注册"),
    EMAIL_REPEAT(8,"邮箱已注册"),
    LOGIN_ERROR(9,"用户名或密码错误"),
    ACCOUNT_EXPIRED(10,"登录账户无效"),
    PASSWORD_EXPIRED(11,"密码无效"),
    ACCOUNT_LOCKED(12,"登录账户被锁定,请联系管理员"),
    UN_DATA_PERMISSION(13,"缺少数据操作权限"),
    HAS_CHILD_DEL_ERROR(14,"存在下级不能删除"),
    DEPT_USER_DEL_ERROR(15,"部门下有用户不能删除"),
    
    
    FILE_TYPE_ERROR(93, "文件类型异常"),
    FILE_OVER_MAX(94, "文件大小超出范围"),
    FILE_MISSING_SUFFIX(95, "文件缺少后缀名"),
    ILLEGAL_OPERATION(96,"请忽非法操作"),
    NO_RECORD(97,"记录不存在或已删除"),
    REPEAT_OPERATION(98,"请忽重复操作"),
    SERVER_ERROR(99, "服务器繁忙,请稍后重试");

    public int code;

    public String message;

    ResultCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}